package javaCode.chapter07.polyparameter_;

//Manager 经理
public class Manager extends Employee {
    private double bonus; //bonus 奖金

    public Manager(String name, double sal, double bonus) {
        super(name, sal);
        this.bonus = bonus;
    }

    public void manage() {
        System.out.println("经理 " + getName() + "is managing");
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    //重写获取年薪的方法
    @Override
    public double getAnnual() {
        return super.getAnnual() + bonus;
    }
}
